Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JNG-5862 transform navigations #258

Merged
merged 6 commits into from
Jul 26, 2024

Conversation

noherczeg
Copy link
Contributor

@noherczeg noherczeg commented Jul 25, 2024

Sub-taskJNG-5862 Transform navigations

@noherczeg noherczeg marked this pull request as ready for review July 25, 2024 18:18
Copy link

coderabbitai bot commented Jul 25, 2024

Walkthrough

The recent changes enhance the JSL framework's functionality and organization, particularly in relationship management, UI component integration, and identifier generation. Key updates include refined logic for obtaining fully qualified names, improved methods for retrieving relations, and new functionalities for handling view and row links. Additionally, UI transformation rules have been updated to streamline navigation and improve clarity in test cases, ultimately enhancing user experience and code maintainability.

Changes

Files Change Summary
.../actor/actorLinkDeclaration.eol Logic in getFqName was modified to utilize getTransferContainer() for constructing fully qualified names.
.../data/transferDeclaration.eol Enhanced getAllRelations method and introduced getDirectRelations for better granularity in relation retrieval.
.../ui/_importUI.eol Added imports for rowLinkDeclaration.eol, viewLinkDeclaration.eol, and viewTableDeclaration.eol to expand module dependencies.
.../ui/rowLinkDeclaration.eol Introduced operations getId() and getFqName() to manage row link identifiers with caching for performance.
.../ui/viewLinkDeclaration.eol Added getId() and getFqName() methods to manage view link identifiers, also with caching.
.../ui/viewPanelDeclaration.eol Improved getAllRelations to include deeper relationships recursively.
.../ui/viewTableDeclaration.eol Introduced several operations to manage view table declarations, including getAllLinks() and getDetailLink().
.../transformations/ui/jslToUi.etl Added import for rowLinkDeclaration.etl to enhance UI transformation capabilities.
.../modules/application/actorLinkDeclaration.etl Enhanced AccessPageDefinition to handle additional relations and actions for improved interactivity.
.../modules/structure/transferFieldDeclaration.etl Updated ID generation logic to incorporate actorDeclaration.name for better traceability.
.../modules/structure/transferRelationDeclaration.etl Adjusted ID setting to use actorDeclaration.name for more contextual relation type IDs.
.../modules/type/type.etl Modified ID generation for various types to include actorDeclaration.name, improving contextual relevance.
.../modules/view/rowLinkDeclaration.etl New RowLinkPageDefinition rule added to transform RowLinkDeclaration into UI page definitions effectively.
.../modules/view/viewLinkDeclaration.etl Significant additions of rules for button and action definitions related to ViewLinkDeclaration.
.../modules/view/viewTableDeclaration.etl Removed ViewTablePageDefinition rule; added new rules for handling view table actions.
.../application/JslModel2UiApplicationTest.java Simplified entity name assertions to enhance clarity in tests.
.../application/JslModel2UiNavigationTest.java New test suite for validating navigation model in the JSL UI application, ensuring correct UI generation from the JSL model.
.../application/JslModel2UiWidgetsTest.java Renamed variable relatedAttribute to relatedRelation for clarity.
pom.xml Updated judo-meta-ui-version to a general development version.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant JSLModel
    participant UI
    participant ActorLink

    User->>JSLModel: Request Navigation
    JSLModel->>ActorLink: Retrieve Links
    ActorLink-->>JSLModel: Return Links
    JSLModel-->>UI: Render Navigation
    UI-->>User: Display Updated Navigation
Loading

🐇 In the code we dance and weave,
New links and views, patterns we leave.
With hops and jumps, the changes flow,
A brighter UI, watch it glow!
Celebrate the lines we intertwine,
In code’s embrace, we joyously shine! 🌟


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 012b6c0 and 5baa148.

Files selected for processing (1)
  • judo-tatami-jsl-jsl2ui/src/test/java/hu/blackbelt/judo/tatami/jsl/jsl2ui/application/JslModel2UiNavigationTest.java (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • judo-tatami-jsl-jsl2ui/src/test/java/hu/blackbelt/judo/tatami/jsl/jsl2ui/application/JslModel2UiNavigationTest.java

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (9)
judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/ui/_importUI.eol (2)

1-1: Import statement rowLinkDeclaration.eol is not utilized in the codebase.

The import statement for rowLinkDeclaration.eol is present in the file but there is no evidence of its usage in the codebase. You may consider removing this import if it is not required.

  • judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/ui/_importUI.eol
  • judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/jslToUi.etl
Analysis chain

Import statement added: rowLinkDeclaration.eol.

This import statement is necessary if the file rowLinkDeclaration.eol is used in this module. Ensure that the imported file is utilized appropriately.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `rowLinkDeclaration` in the codebase.

# Test: Search for the usage of `rowLinkDeclaration`. Expect: Usage in the codebase.
rg --type eol $'rowLinkDeclaration'

Length of output: 62


Script:

#!/bin/bash
# Description: Verify the usage of `rowLinkDeclaration` in the codebase.

# Test: Search for the usage of `rowLinkDeclaration`. Expect: Usage in the codebase.
rg 'rowLinkDeclaration'

Length of output: 245


Script:

#!/bin/bash
# Description: Verify the usage of `rowLinkDeclaration` in the specified files.

# Test: Search for the usage of `rowLinkDeclaration` in `jslToUi.etl` and `_importUI.eol`.
rg 'rowLinkDeclaration' judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/jslToUi.etl
rg 'rowLinkDeclaration' judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/ui/_importUI.eol

Length of output: 269


7-7: Unused import statement: viewTableDeclaration.eol.

The import statement for viewTableDeclaration.eol is added but not utilized within the files where it is imported. Please review and remove the unnecessary import to maintain clean and efficient code.

  • judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/ui/_importUI.eol
  • judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/jslToUi.etl
Analysis chain

Import statement added: viewTableDeclaration.eol.

This import statement is necessary if the file viewTableDeclaration.eol is used in this module. Ensure that the imported file is utilized appropriately.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `viewTableDeclaration` in the codebase.

# Test: Search for the usage of `viewTableDeclaration`. Expect: Usage in the codebase.
rg --type eol $'viewTableDeclaration'

Length of output: 64


Script:

#!/bin/bash
# Description: Verify the usage of `viewTableDeclaration` in the codebase.

# Test: Search for the usage of `viewTableDeclaration`. Expect: Usage in the codebase.
rg 'viewTableDeclaration'

Length of output: 251


Script:

#!/bin/bash
# Description: Verify the usage of `viewTableDeclaration` in the files where it is imported.

# Test: Search for the usage of `viewTableDeclaration` in `jslToUi.etl` and `_importUI.eol`.
rg 'viewTableDeclaration' judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/jslToUi.etl
rg 'viewTableDeclaration' judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/ui/_importUI.eol

Length of output: 277

judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/type/type.etl (7)

82-82: Inconsistent ID Generation Logic for CreateBooleanType

The new ID generation logic that includes actorDeclaration.name is applied in the ui module but not in the psm module. To ensure consistency and avoid potential issues, please update the ID generation logic in the psm module to match the new format.

  • judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/type/type.etl
Analysis chain

LGTM! Verify the new ID generation logic.

The new ID format includes actorDeclaration.name, enhancing contextual relevance. Ensure all usages of these IDs are updated accordingly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateBooleanType.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg --type epsilon -A 5 $'CreateBooleanType'

Length of output: 74


Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateBooleanType.

# Test: Search for the usage of the new ID format in .etl files. Expect: Only occurrences of the new format.
rg 'CreateBooleanType' -g '*.etl' -A 5

Length of output: 2797


21-21: Inconsistent ID Format for CreateDateType

The new ID format includes actorDeclaration.name, enhancing contextual relevance. However, the old format is still present in some parts of the codebase. Ensure all occurrences are updated to use the new format for consistency.

  • judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/type/type.etl
Analysis chain

LGTM! Verify the new ID generation logic.

The new ID format includes actorDeclaration.name, enhancing contextual relevance. Ensure all usages of these IDs are updated accordingly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateDateType.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg --type epsilon -A 5 $'CreateDateType'

Length of output: 71


Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateDateType.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg -A 5 'CreateDateType'

Length of output: 4914


7-7: Inconsistent ID Generation Logic for CreateNumericType

The ID generation logic for CreateNumericType has been updated in judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/type/type.etl but remains unchanged in judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/type/type.etl. Ensure that the ID generation logic is consistent across all relevant files.

  • judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/type/type.etl: Updated format
  • judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/type/type.etl: Old format
Analysis chain

LGTM! Verify the new ID generation logic.

The new ID format includes actorDeclaration.name, enhancing contextual relevance. Ensure all usages of these IDs are updated accordingly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateNumericType.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg --type epsilon -A 5 $'CreateNumericType'

Length of output: 74


Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateNumericType.

# Step 1: Locate all relevant files (assuming .etl extension for epsilon files)
fd --extension etl > epsilon_files.txt

# Step 2: Search for the usage of the new ID format within the located files
xargs -a epsilon_files.txt rg 'CreateNumericType'

Length of output: 593


125-125: Inconsistent ID Format Detected

The new ID format includes actorDeclaration.name, which enhances contextual relevance. However, there are files that still use the old format. Ensure all occurrences of CreateBinaryType are updated to use the new ID format for consistency.

  • src/main/epsilon/transformations/ui/modules/type/type.etl: Uses the new format.
  • src/main/epsilon/transformations/psm/modules/type/type.etl: Still uses the old format.
Analysis chain

LGTM! Verify the new ID generation logic.

The new ID format includes actorDeclaration.name, enhancing contextual relevance. Ensure all usages of these IDs are updated accordingly.


Let's re-run the search without specifying the file type to verify the usage of the new ID format.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateBinaryType.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg --type epsilon -A 5 $'CreateBinaryType'

Length of output: 73


Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateBinaryType.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg -A 5 'CreateBinaryType'

Length of output: 4288


69-69: Inconsistent ID Generation Logic for CreateEnumerationMember

The new ID format includes actorDeclaration.name, which enhances contextual relevance. However, the old format is still present in other parts of the codebase. Ensure all occurrences of the ID generation logic are updated to maintain consistency.

  • judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/type/type.etl
  • judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/type/type.etl
Analysis chain

LGTM! Verify the new ID generation logic.

The new ID format includes actorDeclaration.name, enhancing contextual relevance. Ensure all usages of these IDs are updated accordingly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateEnumerationMember.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg --type epsilon -A 5 $'CreateEnumerationMember'

Length of output: 80


Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateEnumerationMember.

# Test: Search for the usage of the new ID format across all files.
rg 'CreateEnumerationMember' -A 5

Length of output: 2831


57-57: Update ID Format for Consistency

The ID generation logic in judo-tatami-jsl-jsl2ui/src/main/epsilon/transformations/ui/modules/type/type.etl has been updated to include actorDeclaration.name. However, other files still use the old ID format. Please ensure all occurrences of CreateEnumerationType are updated to maintain consistency across the codebase.

  • judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/type/type.etl
Analysis chain

LGTM! Verify the new ID generation logic.

The new ID format includes actorDeclaration.name, enhancing contextual relevance. Ensure all usages of these IDs are updated accordingly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateEnumerationType.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg --type epsilon -A 5 $'CreateEnumerationType'

Length of output: 78


Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateEnumerationType.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg -A 5 'CreateEnumerationType'

Length of output: 4916


33-33: Inconsistent ID Format for CreateTimeType

The new ID format includes actorDeclaration.name, but there are still instances using the old format. Please update all occurrences to ensure consistency.

  • File: judo-tatami-jsl-jsl2psm/src/main/epsilon/transformations/psm/modules/type/type.etl

    • Line: 33
    • Old format: t.setId("(jsl/" + s.getId() + ")/CreateTimeType");
  • File: judo-tatami-jsl-jsl2psm/src/main/epsilon/operations/jsl/data/primitiveDeclaration.eol

    • Line: 45
    • Old format: return self.equivalent("CreateTimeType");
  • File: judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/data/primitiveDeclaration.eol

    • Line: 45
    • Old format: return self.equivalent("CreateTimeType");

Please ensure all references to CreateTimeType use the new ID format for consistency.

Analysis chain

LGTM! Verify the new ID generation logic.

The new ID format includes actorDeclaration.name, enhancing contextual relevance. Ensure all usages of these IDs are updated accordingly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateTimeType.

# Test: Search for the usage of the new ID format. Expect: Only occurrences of the new format.
rg --type epsilon -A 5 $'CreateTimeType'

Length of output: 71


Script:

#!/bin/bash
# Description: Verify the new ID generation logic for CreateTimeType.

# Find all files in the repository and search for occurrences of CreateTimeType
fd -t f -x rg 'CreateTimeType' {}

Length of output: 382


Script:

#!/bin/bash
# Description: Verify the consistency of the new ID generation logic for CreateTimeType.

# Search for all occurrences of CreateTimeType and show surrounding lines for context
rg 'CreateTimeType' -A 10 -B 10

Length of output: 13406

@noherczeg noherczeg merged commit 2e2904f into develop Jul 26, 2024
3 checks passed
@noherczeg noherczeg deleted the feature/JNG-5862-transform-navigations branch July 26, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants